package base.day16.polymorpic;

public class Textpolymotpic1 {
    public static void main(String[] args) {
        Cat cat=new Cat();
        cat.cat();
        cat.animal();

        Animal a=new Cat();
        cat.cat();
        cat.animal();
    }
}
class Animal{
    public void animal(){
        System.out.println("动物吃饭");
    }
}
class Cat extends Animal{
    public void cat(){
        System.out.println("猫吃饭");
    }
}